package com.ray.monitor.model.vo;

/**
 * 进程监控信息对象 - 前端展示对象
 *  - 处理{@link com.ray.monitor.model.po.ProcessMonitor}的数据格式，如内存转化为xx.xxMB、CPU占用xx.xx%
 *
 * @author LiaoYuXing-Ray
 * @version 1.0
 * @createDate 2024/5/23 9:35
 **/
public class ProcessMonitorVO {
    /**
     * 进程名
     */
    private String processName;
    /**
     * 进程ID
     */
    private Integer pid;
    /**
     * 父进程ID
     */
    private Integer PPid;
    /**
     * 进程CPU占用百分比
     */
    private String cpu;
    /**
     * 进程的占用内存 RSS（Resident Set Size）以字节为单位
     */
    private String rss;
    /**
     * 进程占用总内存的百分比
     */
    private String memory;
    /**
     * 进程的线程数
     */
    private Integer threadCount;

    public String getProcessName() {
        return processName;
    }

    public void setProcessName(String processName) {
        this.processName = processName;
    }

    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public Integer getPPid() {
        return PPid;
    }

    public void setPPid(Integer PPid) {
        this.PPid = PPid;
    }

    public String getCpu() {
        return cpu;
    }

    public void setCpu(String cpu) {
        this.cpu = cpu;
    }

    public String getRss() {
        return rss;
    }

    public void setRss(String rss) {
        this.rss = rss;
    }

    public String getMemory() {
        return memory;
    }

    public void setMemory(String memory) {
        this.memory = memory;
    }

    public Integer getThreadCount() {
        return threadCount;
    }

    public void setThreadCount(Integer threadCount) {
        this.threadCount = threadCount;
    }

    @Override
    public String toString() {
        return "ProcessMonitorVO{" +
                "processName='" + processName + '\'' +
                ", pid=" + pid +
                ", PPid=" + PPid +
                ", cpu='" + cpu + '\'' +
                ", rss='" + rss + '\'' +
                ", memory='" + memory + '\'' +
                ", threadCount=" + threadCount +
                '}';
    }
}
